<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>AngelScript: Operator precedence</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">AngelScript
   
   </div>
   
  </td>
  
  
  
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('doc_operator_precedence.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">Operator precedence </div>  </div>
</div>
<div class="contents">
<div class="textblock"><p>In expressions, the operator with the highest precedence is always computed first.</p>
<h2><a class="anchor" id="unary"></a>
Unary operators</h2>
<p>Unary operators have the higher precedence than other operators, and between unary operators the operator closest to the actual value has the highest precedence. Post-operators have higher precedence than pre-operators.</p>
<p>This list shows the available unary operators.</p>
<table  cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="150" valign="top"><code>::</code> </td><td valign="top">scope resolution operator </td></tr>
<tr>
<td width="150" valign="top"><code>[]</code> </td><td valign="top">indexing operator </td></tr>
<tr>
<td width="150" valign="top"><code>++ --</code> </td><td valign="top">post increment and decrement </td></tr>
<tr>
<td width="150" valign="top"><code>.</code> </td><td valign="top">member access </td></tr>
<tr>
<td width="150" valign="top"><code>++ --</code> </td><td valign="top">pre increment and decrement </td></tr>
<tr>
<td width="150" valign="top"><code>not !</code> </td><td valign="top">logical not </td></tr>
<tr>
<td width="150" valign="top"><code>+ -</code> </td><td valign="top">unary positive and negative </td></tr>
<tr>
<td width="150" valign="top"><code>~</code> </td><td valign="top">bitwise complement </td></tr>
<tr>
<td width="150" valign="top"><code>@ </code> </td><td valign="top">handle of  </td></tr>
</table>
<h2><a class="anchor" id="binary"></a>
Binary and ternary operators</h2>
<p>This list shows the dual and ternary operator precedence in decreasing order.</p>
<table  cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="180" valign="top"><code>* / %</code> </td><td width="350" valign="top">multiply, divide, and modulo </td></tr>
<tr>
<td valign="top"><code>+ -</code> </td><td valign="top">add and subtract </td></tr>
<tr>
<td valign="top"><code>&lt;&lt; &gt;&gt; &gt;&gt;&gt;</code> </td><td valign="top">left shift, right shift, and arithmetic right shift </td></tr>
<tr>
<td valign="top"><code>&amp;</code> </td><td valign="top">bitwise and </td></tr>
<tr>
<td valign="top"><code>^</code> </td><td valign="top">bitwise xor </td></tr>
<tr>
<td valign="top"><code>|</code> </td><td valign="top">bitwise or </td></tr>
<tr>
<td valign="top"><code>&lt;= &lt; &gt;= &gt;</code> </td><td valign="top">comparison </td></tr>
<tr>
<td valign="top"><code>== != is !is xor ^^</code> </td><td valign="top">equality, identity, and logical exclusive or </td></tr>
<tr>
<td valign="top"><code>and &amp;&amp;</code> </td><td valign="top">logical and </td></tr>
<tr>
<td valign="top"><code>or ||</code> </td><td valign="top">logical or </td></tr>
<tr>
<td valign="top"><code>?:</code> </td><td valign="top">condition </td></tr>
<tr>
<td valign="top"><code>= += -= *= /= %= &amp;=<br/>
 |= ^= &lt;&lt;= &gt;&gt;= &gt;&gt;&gt;=</code> </td><td valign="top">assignment and compound assignments  </td></tr>
</table>
</div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>

    <li class="footer">Generated on Sun Jan 29 2012 15:41:04 for AngelScript by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
